package com.wing.cabinet.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wing.cabinet.model.entity.CellInventoryInout;
import com.wing.cabinet.model.response.CellInventoryInoutApiVO;
import com.wing.cabinet.model.response.CellInventoryInoutVO;
import com.wing.cabinet.model.response.NeckNewExportVO;
import com.wing.cabinet.model.response.OldNeckNewExportVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 售刀柜上货(上货主表无展示)/领取-Dao
 *
 * @author
 */
@Mapper
public interface CellInventoryInoutDao extends BaseMapper<CellInventoryInout> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<CellInventoryInoutVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<CellInventoryInoutVO> list4app(@Param("page") Page<CellInventoryInoutVO> page, @Param("params") Map<String, Object> params);
    List<CellInventoryInoutVO> list(@Param("page") Page<CellInventoryInoutVO> page, @Param("params") Map<String, Object> params);

    List<CellInventoryInoutVO> list4OldNew(@Param("page") Page<CellInventoryInoutVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    CellInventoryInoutVO get4appById(Long id);

    CellInventoryInoutVO get4appByInOutIdAndSkuCode(@Param("id")Long id, @Param("skuCode")String skuCode);

    /**
     * 导出领用订单数据
     * @param params
     * @return
     */
    List<NeckNewExportVO> getNeckNewExportList(@Param("params") Map<String, Object> params);
    List<OldNeckNewExportVO> getOldNeckNewExportVOList(@Param("params") Map<String, Object> params);

    List<NeckNewExportVO> list(@Param("params") Map<String, Object> params);

    CellInventoryInoutVO getLastMonthNewest(@Param("enterpriseCode")String enterpriseCode,@Param("departmentName")String departmentName);

    List<CellInventoryInoutApiVO> syncCellInventoryInoutList(@Param("params") Map<String, Object> params);

    /**
     * 领新记录（新）
     * @param page
     * @param params
     * @return
     */
    List<CellInventoryInoutVO> pageListNew(@Param("page") Page<CellInventoryInoutVO> page, @Param("params") Map<String, Object> params);
}
